import Http from "../Http";
import {stringify} from "qs";

// 开药管理 增删改查
export default {
    lists(data = {}) {
        return Http.get("/mms/order", data)
    },
    // 用药时间段
    times(patientId) {
        return Http.get("/mms/use/medicine/time", {patientId})
    },
    info(id) {
        return Http.get(`/mms/order/${id}`)
    },
    destroy(id) {
        return Http.delete(`/mms/order/${id}`)
    },
    // 用户预约课程
    create(data) {
        return Http.post("/mms/order/newOrder", stringify(data))
    },
    // 可选状态，0代付款，1待拿药，2已完成
    setStatus(data) {
        return Http.put("/mms/order/updateStatus", stringify(data))
    }
}
